from pydub import AudioSegment

def trim_audio(input_file, output_file, start_time=10000):
    # 加载音频文件
    audio_segment = AudioSegment.from_file(input_file)
    
    # 去掉开始的10秒（10000毫秒）
    trimmed_segment = audio_segment[:20000]
    
    # 将结果保存为wav文件
    trimmed_segment.export(output_file, format='wav')

# 示例用法
input_m4a = "data/voice_source/laoyeye/voice.mp3"
output_wav = "data/voice_source/laoyeye/voice.wav"
trim_audio(input_m4a, output_wav)
